import React, { PureComponent, Component } from 'react'
import { connect } from 'dva'
import {
  Row,
  Col,
  Input,
  Form,
  Button,
  Modal,
  Select
} from 'antd';
const { Option } = Select
const { confirm } = Modal;
import { SearchOutlined, ReloadOutlined,EditOutlined ,DeleteOutlined,ExclamationCircleOutlined} from '@ant-design/icons'
import { history } from 'umi';


import {getType}  from '@/api/system/dict/type.js'

class DictType extends PureComponent {
  formRef = React.createRef();

  // 1. 根据字典id 调用接口

  state = {
    loading: true,
    queryParams: {
      pageNum: 1,
        pageSize: 10,
        dictName: undefined,
        dictType: undefined,
        status: undefined
    },
    //总条数目
    total:0,
    addVisible:false,
    dictId:null,
    editVisible:false,
    record:null
  }

  componentWillMount(){
    this.getList()
  }

  getlist=()=>{
    this.setState({
      loading:true
    })
    getType(this.props.match.params.id).then(res=>{
      if(res.code==200){

      }
    })
  }



  // 2. 获取字典列表
  // 3. 根据路由参数 调用




  render(){
    return(
      <>
        <Row gutter={24}>
          <Col xs={24}>
            <Form
            style={{ display: 'flex' }}
            onFinish={this.onFinish}
            ref={this.formRef}
            >
              <Form.Item label="字典名称"
              style={{ marginRight: '20px' }}
              name="deptName"
              >
                 <Select
                placeholder='用户性别'
                style={{ width: '240px' }}
                >
                  <Option value={"0"}>正常</Option>
                  <Option value={"1"}>停用</Option>
                </Select>
              </Form.Item>

              <Form.Item label="字典标签"
              style={{ marginRight: '20px' }}
              name="deptName"
              >
                <Input
                  style={{ width: '240px' }}
                  placeholder="请输入字典标签"
                />
              </Form.Item>
              {(console.log(this.props.location.state))}
              <Form.Item label="状态"   name="status"
              style={{ marginRight: '20px' }}>
                <Select
                placeholder="数据状态"
                style={{ width: '240px' }}
                >
                  <Option value={"0"}>正常</Option>
                  <Option value={"1"}>停用</Option>
                </Select>
              </Form.Item>
              <Button type="primary"
              style={{ marginRight: '20px' }}
               icon={<SearchOutlined />}
              htmlType="submit"
               >
                搜索
              </Button>
              <Button icon={<ReloadOutlined />} >
                重置
              </Button>
            </Form>
          </Col>
        </Row>
      </>
    )
  }


}



export default DictType
